package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {
//    @Select("select count(*) from emp")
//    Long findCount();

    // @Select("select e.* , d.name dept_name from emp e left join dept d on e.dept_id = d.id limit #{skip},#{pageSize}")
    //List<Emp> getList(Integer skip, Integer pageSize);

    //    @Select("select e.* , d.name dept_name from emp e left join dept d on e.dept_id = d.id")
//    List<Emp> getList(EmpQueryParam empQueryParam);
//
//    @Options(useGeneratedKeys = true, keyProperty = "id")
//    @Insert("insert into emp(username, name, gender, phone, job, salary, image, entry_date, dept_id, create_time, update_time) VALUES " +
//            "(#{username},#{name},#{gender},#{phone},#{job},#{salary},#{image},#{entryDate},#{deptId},#{createTime},#{updateTime})")
//    void save(Emp emp);
//
//    //void delete(List<Integer> ids);
//
//    @Select("select * from emp where id = #{id}")
//    Emp getById(Integer id);
//
//    //void update(Emp emp);
//
    @MapKey("pos")
    List<Map<String, Integer>> getEmpJobData();

    List<Map> getEmpGender();

    List<Map> getDegree();

    List<Map<String, Integer>> getCount();
//
//    @Select("select * from emp where job = 1")
//    List<Emp> getEmp();
//
//    @Select("select * from emp where username = #{username} and password = #{password}")
//    Emp getUsernameAndPassword(@Param("username") String username, @Param("password") String password);

}
